function getCircle1() {
    //初始化echarts的实例
    var myChart = echarts.init(document.getElementById('scale1'))
    // 调用实例中的setOption方法绘制图表
    myChart.setOption({
        series: [
            {
                name: 'Access From',
                type: 'pie',
                radius: ['70%', '85%'],
                avoidLabelOverlap: false,
                label: {
                    show: true,
                    position: 'center',
                    textStyle: {
                        color: '#fff',
                        fontSize: '20',
                        fontWeight: '400'
                    }
                },
                data: [
                    { value: 3048, name: '71%' },
                    { value: 735, name: '29%' }
                ],
                color: ['#EAFF00', '#506593'],
            },
            {
                name: 'Access From',
                type: 'pie',
                radius: ['57%', '60%'],
                avoidLabelOverlap: false,
                label: {
                    show: true,
                    position: 'center',
                    textStyle: {
                        color: '#fff',
                        fontSize: '20',
                        fontWeight: '400'
                    }
                },
                data: [
                    { value: 3048, name: '' },
                ],
                color: ['#2D7DB8'],
            }
        ]
    });
}
getCircle1()
function getCircle2() {
    //初始化echarts的实例
    var myChart = echarts.init(document.getElementById('scale2'))
    // 调用实例中的setOption方法绘制图表
    myChart.setOption({
        series: [
            {
                name: 'Access From',
                type: 'pie',
                radius: ['70%', '85%'],
                avoidLabelOverlap: false,
                label: {
                    show: true,
                    position: 'center',
                    textStyle: {
                        color: '#fff',
                        fontSize: '20',
                        fontWeight: '400'
                    }
                },
                data: [
                    { value: 500, name: '79%' },
                    { value: 4048, name: '21%' }
                ],
                color: ['#EA4D4D', '#506593'],
            },
            {
                name: 'Access From',
                type: 'pie',
                radius: ['57%', '60%'],
                avoidLabelOverlap: false,
                label: {
                    show: true,
                    position: 'center',
                    textStyle: {
                        color: '#fff',
                        fontSize: '20',
                        fontWeight: '400'
                    }
                },
                data: [
                    { value: 3048, name: '' },
                ],
                color: ['#2D7DB8'],
            }
        ]
    });
}
getCircle2()
function getCircle3() {
    //初始化echarts的实例
    var myChart = echarts.init(document.getElementById('scale3'))
    // 调用实例中的setOption方法绘制图表
    myChart.setOption({
        series: [
            {
                name: 'Access From',
                type: 'pie',
                radius: ['70%', '85%'],
                avoidLabelOverlap: false,
                label: {
                    show: true,
                    position: 'center',
                    textStyle: {
                        color: '#fff',
                        fontSize: '20',
                        fontWeight: '400'
                    }
                },
                data: [
                    { value: 350, name: '81%' },
                    { value: 6082, name: '19%' }
                ],
                color: ['#395EE6', '#506593'],
            },
            {
                name: 'Access From',
                type: 'pie',
                radius: ['57%', '60%'],
                avoidLabelOverlap: false,
                label: {
                    show: true,
                    position: 'center',
                    textStyle: {
                        color: '#fff',
                        fontSize: '20',
                        fontWeight: '400'
                    }
                },
                data: [
                    { value: 3048, name: '' },
                ],
                color: ['#2D7DB8'],
            }
        ]
    });
}
getCircle3()
function Togram() {
    var myChart = echarts.init(document.getElementById('histogram'))
    myChart.setOption({
        legend: {
            textStyle: {//标题颜色
                color: "#3D72B1"
            }
        },
        grid: [
            { left: '10%', top: '30%', width: '80%', height: '50%' },
        ],
        xAxis: [
            {
                type: 'category',
                data: ['2016', '2017', '2018', '2019'],
                axisLine: {  //这是x轴文字颜色
                    lineStyle: {
                        color: "#3D72B1",
                    }
                },
            }
        ],
        yAxis: [
            {
                type: 'value',
                name: '单位万',
                min: 0,
                max: 60,
                interval: 10,
                axisLabel: {
                    formatter: '{value}'
                },
                axisLine: {  //这是x轴文字颜色
                    lineStyle: {
                        color: "#3D72B1",
                    }
                },
                splitLine: {
                    show: true,
                    lineStyle: {
                        color: ['#3D72B1'],
                        width: 1,
                        type: 'solid'
                    }
                }

            },
            {
                type: 'value',
                name: '增速',
                min: -12,
                max: 6,
                interval: 3,
                axisLabel: {
                    formatter: '{value}%',
                },
                axisLine: {  //这是x轴文字颜色
                    lineStyle: {
                        color: "#3D72B1",
                    }
                },
                splitLine: {
                    show: true,
                    lineStyle: {
                        color: ['#3D72B1'],
                        width: 1,
                        type: 'solid'
                    }
                }
            }
        ],
        series: [
            {
                name: '字段1',
                data: [34, 30, 35, 28],
                type: 'bar',
                showBackground: false,
                barWidth: '16px', //柱体宽度
                itemStyle: {
                    barBorderRadius: [25, 25, 25, 25], //柱体圆角   
                    color: new echarts.graphic.LinearGradient(
                        0, 1, 0, 0, [{//只要修改前四个参数就ok
                            offset: 0,
                            color: '#0EBDB4'
                        }, //柱图渐变色
                        {
                            offset: 1,
                            color: '#85D371'
                        }
                    ]
                    ),
                }
            },
            {
                name: '字段2',
                data: [18, 16, 14, 19],
                type: 'bar',
                showBackground: false,
                barWidth: '16px', //柱体宽度
                itemStyle: {
                    barBorderRadius: [25, 25, 25, 25], //柱体圆角   
                    color: new echarts.graphic.LinearGradient(
                        0, 1, 0, 0, [{//只要修改前四个参数就ok
                            offset: 0,
                            color: '#5246F2'
                        }, //柱图渐变色
                        {
                            offset: 1,
                            color: '#8B83E0'
                        }
                    ]
                    ),
                }
            },
            {
                name: '字段3',
                data: [18, 16, 14, 19],
                type: 'bar',
                showBackground: false,
                barWidth: '16px', //柱体宽度
                itemStyle: {
                    barBorderRadius: [25, 25, 25, 25], //柱体圆角   
                    color: new echarts.graphic.LinearGradient(
                        0, 1, 0, 0, [{//只要修改前四个参数就ok
                            offset: 0,
                            color: '#F58646'
                        }, //柱图渐变色
                        {
                            offset: 1,
                            color: '#F2C64B'
                        }
                    ]
                    ),
                }
            },
            {
                name: '字段4',
                type: 'line',
                smooth: true,
                data: [30, 18, 50, 40],
                emphasis: {
                    focus: 'series'
                },
            },
            {
                name: '字段5',
                type: 'line',
                smooth: true,
                data: [30, 33, 40, 20],
                emphasis: {
                    focus: 'series'
                },
            },
            {
                name: '字段6',
                type: 'line',
                smooth: true,
                data: [30, 26, 48, 56],
                emphasis: {
                    focus: 'series'
                },
            },
        ]
    })
}
Togram()